/*输入 某年某月某日 判断这是这一年第几天*/
#include <stdio.h>
int isleap(int year);

int isleap(int year)
{
	if(year%4==0&&year%100!=0)
		return 1;
	else if(year%400==0)
		return 1;
	else
		return 0;
}

int main()
{
	int year,mon,day,days=0,a,i;
	printf("the date:");
	scanf("%d%d%d",&year,&mon,&day);
	switch(mon)
	{
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12: a=31;break;
		case 4:
		case 6:
		case 9:
		case 11: a=30;break;
		case 2:if(isleap(year)==1)
			       a=29;
		       a=28;break;
	}

	for(i=1;i<mon;i++)
	{
		switch(mon);
		days+=a;
	}
	days+=day;
	printf("the day is this year %d days\n",days);
}
		


